Skip to content

Add standalone documentation for sr_model class#195

Draft
Copilot wants to merge 3 commits into
mainfrom
copilot/add-documentation-for-sr-model
Draft

Add standalone documentation for sr_model class#195
Copilot wants to merge 3 commits into
mainfrom
copilot/add-documentation-for-sr-model

Conversation

Copilot AI commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

The sr_model class had no dedicated help page — its structure was only documented inline in run_mod()'s @returns section.

Changes

  • R/sr_model-class.R — New roxygen2 documentation page covering all data columns, custom attributes (including the population_params attribute from PR Adding population parameters as attributes #141), class inheritance, and construction notes
  • pkgdown/_pkgdown.yml — Register sr_model-class in the "Model seroresponse" reference section
  • Fix [dplyr::tbl_df][tibble::tbl_df] cross-references in Run_Mod.R, nepal_sees_jags_output.R, plot_predicted_curve.R, use_att_names.R — these were resolving to dplyr::defunct since tbl_df moved to tibble
  • inst/WORDLIST — Added "precisions"
  • Version bump to 0.0.0.9048, NEWS.md entry

Usage

?sr_model
# or
help("sr_model-class")

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • cdn.jsdelivr.net
    • Triggering command: /opt/R/4.5.3/lib/R/bin/exec/R /opt/R/4.5.3/lib/R/bin/exec/R --slave --no-save --no-restore -f /tmp/RtmpxekeiW/callr-scr-ad506a2a03f7 (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI requested review from Copilot and removed request for Copilot April 14, 2026 06:14
Copilot AI linked an issue Apr 14, 2026 that may be closed by this pull request
Agent-Logs-Url: https://github.com/ucdavis/serodynamics/sessions/6530ae68-4931-43a9-afe7-d3a8fad022b6

Co-authored-by: sschildhauer <165851188+sschildhauer@users.noreply.github.com>
Copilot AI requested review from Copilot and removed request for Copilot April 14, 2026 06:39
Copilot AI requested review from Copilot and removed request for Copilot April 14, 2026 06:42
Copilot AI changed the title [WIP] Add documentation for sr_model class Add standalone documentation for sr_model class Apr 14, 2026
Copilot AI requested a review from sschildhauer April 14, 2026 06:43
@sschildhauer sschildhauer requested a review from Kwan-Jenny April 14, 2026 07:51
@github-actions

Copy link
Copy Markdown
Contributor

📖 https://ucd-serg.github.io/serodynamics/preview/pr195
Preview documentation for this PR (at commit bdb7858)

@Kwan-Jenny Kwan-Jenny left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @sschildhauer ! The new standalone ?sr_model page
is going to be really helpful for users — having all the columns and
attributes in one place is great.

I left a few suggestions inline:

  1. population_params documentation depends on PR #141 not yet
    being merged.
  2. Iso_typebiomarker_var — a cross-reference would help
    users trace the data pipeline.
  3. @examples block — would be a nice addition.

Comment thread R/sr_model-class.R
#' sampling.}
#' \item{nThin}{[integer] thinning interval (ratio of total iterations to
#' retained samples, i.e., `niter / nmc`).}
#' \item{population_params}{(optional) a [tibble::tbl_df] of modeled

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since population_params attribute is being introduced in PR #141 (not yet merged into main), I think we should either:
(a) wait to merge this PR until #141 is merged, or
(b) add a note in the documentation like (available when run_mod() is called with with_pop_params = TRUE in package versions ≥ X.X.X.XXXX)

Otherwise users reading ?sr_model may get confused when they don't see this attribute on their sr_model object.

Comment thread R/sr_model-class.R
#' \item `shape` -- shape parameter
#' \item `alpha` -- decay rate
#' }}
#' \item{Iso_type}{[character] antibody/antigen isotype combination being

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quick clarifying question — is Iso_type in sr_model the same conceptual variable as biomarker_var in as_case_data()?

Comment thread R/sr_model-class.R
#'
#' @name sr_model-class
#' @aliases sr_model
NULL

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be possible to add a small @examples block showing how to inspect an sr_model object? Even something like:

Suggested change
NULL
#' @examples
#' \dontrun{
#' data(nepal_sees_jags_output)
#' class(nepal_sees_jags_output)
#' attributes(nepal_sees_jags_output)
#' head(nepal_sees_jags_output)
#' }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create documentation for sr_model class

3 participants